package org.zp.service;

import java.util.ArrayList;
import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.zp.mapper.NetWorkInfoMapper;
import org.zp.pojo.NEInfo;
import org.zp.vo.NetWithAdminVo;
import org.zp.vo.NetWorkVo;

import com.github.pagehelper.PageHelper;

//import oracle.net.aso.n;


@Service
@Transactional(rollbackFor = Exception.class)//出现异常就回滚事务
public class NetWorkInfoServiceimpl implements NetWorkInfoService{
	@Resource
	private NetWorkInfoMapper n;

	@Override
	public Integer addAdminNetwork(Long aid, Integer three) {
		// TODO Auto-generated method stub
		return n.addAdminNetwork(aid,three);
	}

	@Override
	public List<NetWorkVo> selectNetWorkINFO(Integer startpage, Integer limitpage, String name,String fname) {
		// TODO Auto-generated method stub
		PageHelper.startPage(startpage, limitpage);
		return n.selectNetWorkINFO(name,fname);
	}

	@Override
	public Integer netWorkNameEdit(Integer neIdd, String networkName) {
		// TODO Auto-generated method stub
		return n.netWorkNameEdit(neIdd,networkName);
	}

	@Override
	public Integer netWorkDel(Integer neId) {
		// TODO Auto-generated method stub
		return n.netWorkDel(neId);
	}

	@Override
	public Integer addNetwork(Integer three, String netname, String detail) {
		// TODO Auto-generated method stub
		return n.addNetwork(three,netname,detail);
	}

	@Override
	public NetWithAdminVo selectNAbyAid(Long aid) {
		// TODO Auto-generated method stub
		return n.selectNAbyAid(aid);
	}

	@Override
	public Integer updateNetMoney(Integer neid,Integer newMoney) {
		// TODO Auto-generated method stub
		return n.updateNetMoney(neid,newMoney);
	}

	@Override
	public Integer updateNetpsun(Integer areaid, Integer count) {
		// TODO Auto-generated method stub
		System.out.println("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx地点id:"+areaid);
		System.out.println("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx问题件数:"+count);
		return n.updateNetpsun(areaid,count);
	}

	@Override
	public Integer updateNetbsun(Integer neid, Integer count) {
		// TODO Auto-generated method stub
		return n.updateNetbsun(neid,count);
	}

	@Override
	public Integer updateNetesun(Integer neid, Integer count) {
		// TODO Auto-generated method stub
		return n.updateNetesun(neid,count);
	}

	@Override
	public NEInfo selectNetWorkByAreaid(Integer areaid) {
		// TODO Auto-generated method stub
		return n.selectNetWorkByAreaid(areaid);
	}

	
}
